enum Student {xiaoming,xiaohong,xiaolan};
let xiaomingValue: Student = Student.xiaohong;

//为枚举的元素设置编号
enum Color {Red = 1,Green=4,Blue=6};
let colorName: string = Color[4];
function test() {
    document.writeln("xiaoming:"+Student.xiaoming
        +"<p></p>xiaohong:"+Student.xiaohong
        +"<p></p>xiaolan:"+Student.xiaolan
    );

    document.writeln("<p></p>枚举Color编号为2的元素名称："+colorName);
}
test();


